/*

1. bytecode is a machine-readable language compiled from
source code

2. Inheritance, encapsulation, and polymorphism

3. on the JVM or the MAIN method

4. a memory address that points to some other memory address

5. 67count

6. use //

7. if (condition)
   {	body
   }

8. for(iterator, condition, step)
   { body
   }

9. 

*/

/*    
   Compute your weight on the moon.  
   
   Call this file Moon.java.   
*/    

class Moon {
	public static void main(String args[]) {
	    int my_weight = 165;
	    double gravity = .17;

	    System.out.println("my weight on the moon is: " + my_weight * gravity);
	    Moon2();
	    InchesToMeters();
	}


    
  static void Moon2()
  {    
    double earthweight; // weight on earth  
    double moonweight; // weight on moon   
   
    earthweight = 165;   
  
    moonweight = earthweight * 0.17;  
   
    System.out.println(earthweight + " earth-pounds is equivalent to " +  
                       moonweight + " moon-pounds.");    
   
  }    


/*  
   Try This 1-2 
 
   This program displays a conversion  
   table of Inches to Meters. 
 
   Call this program "GalToLitTable.java". 
*/  
  
  static void InchesToMeters() {  
    double Inches, Meters; 
    int counter; 
 
    counter = 0; 
    for(Inches = 1; Inches <= 144; Inches++) { 
      Meters = Inches / 12; // convert to Meters 
      System.out.println(Inches + " Inches is " + 
                         Meters + " Meters."); 
 
      counter++; 
      // every 10th line, print a blank line        
      if(counter == 12) { 
        System.out.println(); 
        counter = 0; // reset the line counter 
      } 
    } 
  }  
} 
